home *** CD-ROM | disk | FTP | other *** search
- --Code for all 5 main sections, the floating pallettes use this functionality
- -- put in start movie of First Animation: NewPallette 1
-
- on NewPallette_Navigation
- if CheckWindow("Navigation") then
- nothing
- else
- cursor [member "Wait", member "Waitmask"]
- global NavigationWindow, HelpWindow
- set the windowType of window "Navigation" to 2
- set NavigationWindow to window "Navigation"
- set the fileName of NavigationWindow to "nav.dir"
- set temp = todesktop (rect(8, 395, 392, 476))
- set the rect of window "Navigation" = temp
- open NavigationWindow
- --put "opening Navigation Window"
- cursor 0
- end if
- end
-
-
- on NewPallette_Printads
- if CheckWindow("Printads") then
- nothing
- else
- cursor [member "Wait", member "Waitmask"]
- --The floater that displays Print ads
- set the windowType of window "Printads" to 2
- set NavigationWindow to window "Printads"
- set the fileName of NavigationWindow to "_brands2.dir"
- set the rect of window "Printads" = todesktop (rect(88, 2, 552, 476))
- open NavigationWindow
- cursor 0
- end if
- end
-
-
- on NewPallette_Search
- if CheckWindow("Search") then
- nothing
- else
- cursor [member "Wait", member "Waitmask"]
- --The floater that displays Search
- set the windowType of window "Search" to 2
- set NavigationWindow to window "Search"
- set the fileName of NavigationWindow to "search.dir"
- set the rect of window "Search" = todesktop (rect(158,45,382,435))
- open NavigationWindow
- cursor 0
- end if
- end
-
-
- on NewPallette_Help
- if CheckWindow("Help") then
- nothing
- else
- cursor [member "Wait", member "Waitmask"]
- --The floater that displays Help
- set the windowType of window "Help" to 2
- set NavigationWindow to window "Help"
- set the fileName of NavigationWindow to "help.dir"
- set the rect of window "Help" = todesktop (rect(232,128,408,351))
- open NavigationWindow
- cursor 0
- end if
- end
-
-
- on NewPallette_TVads
- if CheckWindow("TVads") then
- nothing
- else
- cursor [member "Wait", member "Waitmask"]
- --turn off sound for QuickTime
- Shutup
- --The floater that displays TV Ads
- set the windowType of window "TVads" to 2
- set NavigationWindow to window "TVads"
- set the fileName of NavigationWindow to "_brands3.dir"
- set temp = todesktop (rect(88, 2, 552, 476))
- set the rect of window "TVads" = temp
- open NavigationWindow
- cursor 0
- end if
- end
-
-
- on NewPallette_Internet
- if CheckWindow("internet") then
- nothing
- else
- cursor [member "Wait", member "Waitmask"]
- --The floater that displays internet ads
- set the windowType of window "internet" to 2
- set NavigationWindow to window "internet"
- set the fileName of NavigationWindow to "_brands4.dir"
- set the rect of window "internet" = todesktop (rect(72, 60, 568, 430))
- open NavigationWindow
- cursor 0
- end if
- end
-
-
- on NewPallette_Brands
- if CheckWindow("Brands_Navigation") then
- nothing
- else
- cursor [member "Wait", member "Waitmask"]
- --The floater that has the countries in it
- set the windowType of window "Brands_Navigation" to 2
- set the fileName of window "Brands_Navigation" to "_brands1.dir"
- set temp = todesktop (rect(87, 143, 257, 413))
- set the rect of window "Brands_Navigation" = temp
- open window "Brands_Navigation"
- cursor 0
- end if
- end
-
-
- on NewPallette_Mills
- if CheckWindow("Mills_Navigation") then
- --alert the windowlist
- else
- cursor [member "Wait", member "Waitmask"]
- --The floater that has the countries in it
- set the windowType of window "Mills_Navigation" to 2
- set the fileName of window "Mills_Navigation" to "_Mills1.dir"
- set temp = todesktop (rect(87, 143, 257, 413))
- set the rect of window "Mills_Navigation" = temp
- open window "Mills_Navigation"
- cursor 0
- end if
- end
-
-
- on NewPallette_Outdoor
- if CheckWindow("internet") then
- nothing
- else
- cursor [member "Wait", member "Waitmask"]
- --The floater that displays internet ads
- set the windowType of window "Outdoor" to 2
- set NavigationWindow to window "Outdoor"
- set the fileName of NavigationWindow to "_market2.dir"
- set temp = todesktop (rect(88, 2, 552, 476))
- set the rect of window "Outdoor" = temp
- open NavigationWindow
- cursor 0
- end if
- end
-
-
- on CheckWindow TheWindow
- --returns true if the window is present
- set OpenWin = the windowlist
- set Test = false
- repeat with aa = 1 to count (OpenWin)
- set killit = getat(OpenWin,aa)
- delete char 1 to 9 of killit
- delete the last char of killit
- delete the last char of killit
- if killit = TheWindow then
- set Test = true
- end if
- end repeat
- return Test
- end
-
-
-
- on Nav SectionCode
- --List of sections the SectionCode refers to
- --did this so there'de be no spelling errorrs
-
- set SectionList = ["_brands.dir","_mills.dir","_styles.dir","_treat.dir","_market.dir","_Time.dir","main.dir"]
-
- tell the stage to go to frame "Main" of movie getat(SectionList, SectionCode)
- end
-
-
- on MoveWindow Who, DeltaX, DeltaY
- --this moves the pallette around, tedious, but
- --used becasause we want to design the topbar
- set WindowAt = the rect of window Who
- setat (WindowAt,1, (getat (WindowAt,1) + DeltaX))
- setat (WindowAt,3, (getat (WindowAt,3) + DeltaX))
- setat (WindowAt,2, (getat (WindowAt,2) + DeltaY))
- setat (WindowAt,4, (getat (WindowAt,4) + DeltaY))
- set the rect of window Who = WindowAt
- --put "Moving " & Who & " Window"
- end
-
-
- on todesktop Myrect
- set MyDesktop = getat(the deskTopRectList,1)
- if getat (MyDesktop, 3) <> 640 then
- set Myover = (getat(MyDesktop, 3)-640)/2
- set Mydown = (getat(MyDesktop, 4)-480)/2
- return (Myrect + rect (Myover,Mydown,Myover,Mydown,))
- else
- return Myrect
- end if
- end